﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Hotels.aspx.vb" Inherits="NewHotels.Hotels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:PlaceHolder ID="ph_Superuser" runat="server">
        some content goes here
    
    </asp:PlaceHolder>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource2">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="Tags" 
                    DataNavigateUrlFormatString="HotelsByTag.aspx?Tag={0}" DataTextField="Tags" 
                    HeaderText="Tags" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Tags] FROM [tags]"></asp:SqlDataSource>
</p>
    <p>
        &nbsp;</p>
    <p>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1" DataKeyNames="ID">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" 
                DataNavigateUrlFormatString="{0}" DataTextField="HotelName" 
                HeaderText="HotelName" />
            <asp:HyperLinkField DataNavigateUrlFields="Location" 
                DataNavigateUrlFormatString="https://maps.google.co.uk/maps?q={0}" 
                DataTextField="Location" HeaderText="Location" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:ImageField DataImageUrlField="Pictures" HeaderText="Pictures">
                <ControlStyle CssClass="hotelImages" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="hotelDetail.aspx?ID={0}" HeaderText="MoreDetail" 
                Text="Detail" />
            <asp:TemplateField HeaderText="Stars">
            <ItemTemplate><h1><%# getStars(Eval("Stars"))%>  </h1> </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" 
        
            SelectCommand="SELECT [HotelName], [Stars], [Location], [Description], [HotelUrl], [Pictures], [ID] FROM [Hotels]">
    </asp:SqlDataSource>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
